package com.partsoft.dits.integrate;

public class TableBroadcastEdgeDescriptor extends BaseTableDataEdgeDescriptor implements Cloneable {
	
	/**
	 * 插入Trigger名称
	 */
	private String insertTriggerName;
	
	/**
	 * 更新Trigger名称
	 */
	private String updateTriggerName;
	
	/**
	 * 删除Trigger名称
	 */
	private String deleteTriggerName;
	
	/**
	 * 是否发布标准信息(如果不是则不能进行各种转换了，直接发出。)
	 */
	private boolean publishStandard = true;
	
	/**
	 * insert是否已监听
	 */
	private boolean insertMonitored = false;
	
	/**
	 * update是否已监听
	 */
	private boolean updateMonitored = false;
	
	/**
	 * 更新是否已监听
	 */
	private boolean deleteMonitored = false;
	
	public String getInsertTriggerName() {
		return insertTriggerName;
	}

	public void setInsertTriggerName(String insertTriggerName) {
		this.insertTriggerName = insertTriggerName;
	}

	public String getUpdateTriggerName() {
		return updateTriggerName;
	}

	public void setUpdateTriggerName(String updateTriggerName) {
		this.updateTriggerName = updateTriggerName;
	}

	public String getDeleteTriggerName() {
		return deleteTriggerName;
	}

	public void setDeleteTriggerName(String deleteTriggerName) {
		this.deleteTriggerName = deleteTriggerName;
	}

	@Override
	public TableBroadcastEdgeDescriptor clone() {
		return (TableBroadcastEdgeDescriptor) super.clone();
	}
	
	
	public boolean isPublishStandard() {
		return publishStandard;
	}
	
	public void setPublishStandard(boolean publishStandard) {
		this.publishStandard = publishStandard;
	}
	
	@Deprecated
	public boolean isNoPublishStandard() {
		return !isPublishStandard();
	}
	
	@Deprecated
	public void setNoPublishStandard(boolean publishStandard) {
		setPublishStandard(!publishStandard);
	}

	//monitored
	public boolean isInsertMonitored() {
		return insertMonitored;
	}

	public void setInsertMonitored(boolean insertMonitored) {
		this.insertMonitored = insertMonitored;
	}

	public boolean isUpdateMonitored() {
		return updateMonitored;
	}

	public void setUpdateMonitored(boolean updateMonitored) {
		this.updateMonitored = updateMonitored;
	}

	public boolean isDeleteMonitored() {
		return deleteMonitored;
	}

	public void setDeleteMonitored(boolean deleteMonitored) {
		this.deleteMonitored = deleteMonitored;
	}
	
	//noMonitored
	public boolean isNoInsertMonitored() {
		return !isInsertMonitored();
	}

	public void setNoInsertMonitored(boolean insertMonitored) {
		this.setInsertMonitored (!insertMonitored);
	}

	public boolean isNoUpdateMonitored() {
		return !isUpdateMonitored();
	}

	public void setNoUpdateMonitored(boolean updateMonitored) {
		this.setUpdateMonitored(!updateMonitored);
	}

	public boolean isNoDeleteMonitored() {
		return !isDeleteMonitored();
	}

	public void setNoDeleteMonitored(boolean deleteMonitored) {
		this.setDeleteMonitored(!deleteMonitored);
	}
	
	@Override
	public String toString() {
		return String.format("数据表发布集成(%s)", getId());
	}
	
}
